package com.starhub.api.document.result;

import lombok.Data;

/**   
 * 文件内容结果
 * @version: V1.0
 * @author: liuhf
 * @time 2025-05-19
 */
@Data
public class FileContentResult {
    private boolean success;
    private String content;
    private Long fileId;
    private String message;

    public static FileContentResult fail(String message) {
        FileContentResult result = new FileContentResult();
        result.setSuccess(false);
        result.setMessage(message);
        return result;
    }

    public static FileContentResult success(String content, Long fileId, String message) {
        FileContentResult result = new FileContentResult();
        result.setContent(content);
        result.setFileId(fileId);
        result.setSuccess(true);
        result.setMessage(message);
        return result;
    }
}
